import request from '@/utils/request'

// 获取交易所列表
export function getExchangeList(params) {
  return request({
    url: '/exchange/lists',
    method: 'get',
    params: params
  })
}

// 获取单个交易所信息
export function getExchangeInfo(exchangeId) {
  return request({
    url: '/exchange/info',
    method: 'get',
    params: {
      exchangeId: exchangeId
    }
  })
}

// 更新交易所的信息
export function updateExchangeInfo(data) {
  return request({
    url: '/exchange/updateInfo',
    method: 'post',
    data: data
  })
}

// 删除单个交易所信息
export function deleteExchange(params) {
  return request({
    url: '/exchange/delete',
    method: 'get',
    params: params
  })
}

// 删除单个交易所信息
export function addExchange(data) {
  return request({
    url: '/exchange/addExchange',
    method: 'post',
    data: data
  })
}

// 获取库中全部交易所
export function getAllExchangeInfo() {
  return request({
    url: '/exchange/allExchange',
    method: 'get'
  })
}
